package com.xxx.empty.api;

import com.alibaba.fastjson2.JSON;
import com.xxx.empty.dao.repository.ESDailyStationRevenueStatisticsRepository;
import com.xxx.empty.domain.document.ESDailyStationRevenueStatistics;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@AllArgsConstructor
public class TestApiImpl implements TestApi {

    @Autowired
    private ESDailyStationRevenueStatisticsRepository ESDailyStationRevenueStatisticsRepository;

    @Override
    public String test() {
        System.out.println(111);
        List<ESDailyStationRevenueStatistics> byStationId = ESDailyStationRevenueStatisticsRepository.findByStationId("1923203014782103554");

        return JSON.toJSONString(JSON.toJSONString(byStationId));
    }

    @Override
    public String test2() {
        return JSON.toJSONString("");
    }

}
